<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>我的积分兑换现金记录_会员中心_<?php echo $cfg_webname; ?></title>
<link href="templets/style/base.css" rel="stylesheet" type="text/css" />
<link href="../../templets/23ps/style/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templets/js/j.js"></script>
<script type="text/javascript" src="templets/js/load.js"></script>
<script type="text/javascript" src="templets/js/leftmenu.js"></script>
<script type="text/javascript" src="templets/js/table_function.js"></script>
<script type="text/javascript">
	//获得选中文件的文件名
	function GetCheckfolderItem()
	{
		var allSel='';
		if(document.form1.deleteid.value) return document.form1.deleteid.value;
		for(i=0;i<document.form1.deleteid.length;i++)
		{
			if(document.form1.deleteid[i].checked)
			{
				if(allSel=='')
				allSel=document.form1.deleteid[i].value;
				else
				allSel=allSel+","+document.form1.deleteid[i].value;
			}
		}
		return allSel;
	}
	
	function DoSubmit()
	{
		var selid = GetCheckfolderItem();
		if(selid=='') {
			alert("你没选中任何信息！");
			return false;
		}
		if(window.confirm("你确定要删除这些消息么？"))
		{
			location = "convert.php?dopost=del&ids="+selid;
		}
	}
</script>
</head>
<body>
<div id="main">
  <?php include(DEDEMEMBER."/templets/head.htm"); ?>
  <div id="content" class="content clearfix">
    <div class="breadcrumbs"><a href="../member/">用户中心</a><span>></span><a href="../member/buy.php">积分管理</a><span>></span><h1>我的积分兑换现金记录</h1></div>
    <div id="mcpmain">
      <div id="appTab">
        <ul>
            <li><a href="buy.php">会员购买/充值积分</a></li>
            <li><a href="operation.php">充值记录</a></li>
            <li class="thisTab"><a href="convert.php">积分兑换现金记录</a></li>
           
           <!--li><a href="shops_orders.php">商品定单</a></li>
           <li><a href="shops_products.php" id="buy">我购买的商品</a></li-->
        </ul>
      </div>
      <div id="mainCp">
      	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list">
      		<tr>
      			<td><?php echo $cfg_ml->GetSta($dsql); ?></td>
      		</tr>
      		<tr>
      			<td>
      				<form action="convert.php" method="post">
      					我要兑换：<input type="text" name="scores" value="100" id="convertVal" /><input type="submit" id="convert" value="兑换" />
      					<input type='hidden' name='dopost' value='convert' /> 
      				</form>	
                    <script type="text/javascript">
					$(document).ready(function(){
						$('#convert').click(function(){
							var _val = $('#convertVal').val();
							if(!/^[-]?\d+$/.test(_val)){
								alert('请输入数字');
								return false;
							}
							if(_val < 100){
								alert('最小总换数为100');
								return false;
							};
						});
					});
					</script>
      			</td>
      		</tr>
      	
      	</table>
        <h3 class="meTitle" style="margin-top:30px">我的积分兑换现金记录</h3>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="list">
          <thead>
              <tr>
                <th width="5%"></th>
                <th width="5%">ID</th>
                <th width="10%">花费积分</th>
                <th width="10%">得到金币</th>
                <th width="10%">状态</th>
                <th width="20%">申请时间</th>
                <th width="20%">审核时间</th>
                <th width="30%">备注</th>
              </tr>
            </thead>
            <form name='form1' action="convert.php" method="post">
            <input type='hidden' name='dopost' value='del' /> 
            <tbody>
            {dede:datalist}
            <tr>
              <td align="center"><input type="checkbox" name="deleteid" value="{dede:field.id/}"/></td>
              <td><?php echo $fields['id']; ?></td>
              <td><?php echo $fields['scores']; ?></td>
              <td><?php echo $fields['rmb']; ?></td>
              <td>
              	<?php 
					if($fields['status'] == 1){
						echo "<font color='green'>审核通过</font>";
					}else{
						echo "<font color='red'>待审核</font>";
					}; 
				?>
			  </td>
              <td><?php echo GetDateTimeMk($fields['apply_time']); ?></td>
              <td><?php echo !empty($fields['check_time']) ? GetDateTimeMk($fields['check_time']) : ''; ?></td>
              <td><?php echo $fields['remark']; ?></td>
            </tr>
            {/dede:datalist}
            <tr>
            <td colspan="8"><button id="checkedClick" type="button" class="greenBtn1">全选</button><button type="button" onclick="DoSubmit()" class="greenBtn3">删除选中</button></td></tr></tbody>
            </form>
          <tfoot>
            <tr>
              <td colspan="9"><div class="pageList">{dede:pagelist listsize=5/}</td>
            </tr>
          </tfoot>
        </table>
      </div>
      <!--主操作区域 -->
    </div>
  </div>
<?php include(DEDEMEMBER."/templets/foot.htm"); ?>
</div>
</body>
</html>
